using Senparc.Weixin.HttpUtility;
using System;
using System.Collections.Generic;
namespace Senparc.Weixin.MP.AppStore.Api
{
	public class MemberApi : BaseApi
	{
		public MemberApi(Passport passport) : base(passport)
		{
		}
		private GetMemberResult GetMemberFunc(int weixinId, string openId)
		{
			string url = this._passport.ApiUrl + "GetMember";
			Dictionary<string, string> dictionary = new Dictionary<string, string>();
			dictionary["token"] = this._passport.Token;
			dictionary["openid"] = openId;
			dictionary["weixinId"] = weixinId.ToString();
			return Post.PostGetJson<GetMemberResult>(url, null, dictionary, null, 10000);
		}
		public GetMemberResult GetMember(int weixinId, string openId)
		{
			return base.ApiConnection.Connection<NormalAppData>(() => this.GetMemberFunc(weixinId, openId)) as GetMemberResult;
		}
	}
}
